

package cn.shengchao.examstart.user.ohs.local.messages;

import lombok.Data;

@Data
public class LoginValue {
    private String nickName;
    private String avatarUrl;
    private Boolean bindPhone;
    private String token;

    public static LoginValue notBindPhone(String token) {
        LoginValue loginValue = new LoginValue();
        loginValue.bindPhone = false;
        loginValue.token = token;
        return loginValue;
    }

    public static LoginValue of(String name, String token, String avatarUrl) {
        LoginValue loginValue = new LoginValue();
        loginValue.bindPhone = true;
        loginValue.token = token;
        loginValue.nickName = name;
        loginValue.avatarUrl = avatarUrl;
        return loginValue;
    }
}
